import React, { Component } from "react";
import { Router, Route, Switch, Redirect } from "react-router-dom";
import "./App.css";
import LoginPage from "./views/login/LoginPage";
import DashboardPage from "./views/dashboard/DashboardPage";
import history from "./History";
import { configure } from "mobx";

configure({
  enforceActions: "observed"
});

class App extends Component {
  render() {
    return (
      <div className="App">
        <Router history={history}>
          <Switch>
            <Route exact path="/" component={DashboardPage} />
            <Redirect from="/dashboard" to="/" />
            <Route path="/login" component={LoginPage} />
            {/* <Route component={NoMatch} /> */}
          </Switch>
        </Router>
      </div>
    );
  }
}

export default App;
